<?php
$this->pageTitle = Yii::app()->name . ' - Password Change';
$this->layout = "//layouts/column1";
?>
<h1>Password Change</h1>
<div class="form" style="">
    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'settings-form',
        'enableClientValidation' => true,
        'clientOptions' => array(
            'validateOnSubmit' => true,
        ),
    ));
    ?>
    
    <?php echo $form->errorSummary($model); ?>
    <?php
    foreach (Yii::app()->user->getFlashes() as $key => $message) {
        echo '<div style="color: green; font-size: 13px; font-weight: bold;" class="flash-' . $key . '">' . $message . "</div>\n";
    }
    ?>
    
    <div class="row">
        <?php echo $form->labelEx($model, 'old_password'); ?>
        <?php echo $form->passwordField($model, 'old_password'); ?>
        <?php echo $form->error($model, 'old_password'); ?>        
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'new_password'); ?>
        <?php echo $form->passwordField($model, 'new_password'); ?>
        <?php echo $form->error($model, 'new_password'); ?>        
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'repeat_password'); ?>
        <?php echo $form->passwordField($model, 'repeat_password'); ?>
        <?php echo $form->error($model, 'repeat_password'); ?>        
    </div>
    </div>
    
        <div class="row buttons span-12">
            <?php echo CHtml::submitButton('Change Password'); ?>
        </div> 
    <?php $this->endWidget(); ?>
    <div class="clear"></div>
</div>
